pkg_name=curl
version=7.40.0
build_dir=$builds_dir_root/$pkg_name-$version
src_dir=$src_dir_root/$pkg_name-$version
url=http://curl.haxx.se/download/$pkg_name-$version.tar.bz2

cd "$src_dir_root"
rm -Rf "$pkg_name-$version"
tar jxf "$pkg_name-$version.tar.bz2"

rm -Rf "$build_dir"
mkdir -p "$build_dir"
cd "$build_dir"

export CFLAGS=-O0
export PATH_SEPARATOR=:
"$src_dir/configure"		\
	--prefix=/		\
	--disable-debug		\
	--disable-curldebug	\
	--enable-symbol-hiding	\
	--disable-ares		\
	--disable-static	\
	--enable-http		\
	--enable-ftp		\
	--disable-file		\
	--disable-ldap		\
	--disable-ldaps		\
	--disable-rtsp		\
	--disable-proxy		\
	--disable-dict		\
	--disable-telnet	\
	--disable-tftp		\
	--disable-pop3 		\
	--disable-imap		\
	--disable-smb		\
	--disable-smtp		\
	--disable-gopher	\
	--disable-manual	\
	--enable-ipv6 		\
	--enable-verbose	\
	--disable-sspi		\
	--disable-tls-srp	\
	--enable-cookies	\
	--with-gnu-ld		\
	--without-ssl		\
	--with-gnutls		\
	--without-polarssl	\
	--without-cyassl	\
	--without-nss		\
	--without-axtls		\
	--without-libssh2	\
	--without-librtmp	\
	--without-nghttp2
unset CFLAGS

make

install_tmp_dir=/tmp/$pkg_name-$version
rm -Rf "$install_tmp_dir"
mkdir -p "$install_tmp_dir"
make install "DESTDIR=$install_tmp_dir"
unset PATH_SEPARATOR

install_dirs "$builders_dir_root/$pkg_name/runtime.dirs"
install_files "$builders_dir_root/$pkg_name/runtime.files" "$install_tmp_dir"
install_links "$builders_dir_root/$pkg_name/runtime.links"
install_dirs "$builders_dir_root/$pkg_name/devel.dirs"
install_files "$builders_dir_root/$pkg_name/devel.files" "$install_tmp_dir"
install_links "$builders_dir_root/$pkg_name/devel.links"
elf_strip "$builders_dir_root/$pkg_name/elf-strip"

rm -Rf "$install_tmp_dir"
rm -Rf "$build_dir"
rm -Rf "$src_dir"
